package com.wang.exam.controller;

import com.wang.exam.pojo.ExamCourses;
import com.wang.exam.service.CourseService;
import com.wang.exam.service.TeacherExamCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
public class TeacherExamCourseController {
    @Autowired
    TeacherExamCourseService teacherExamCourseService;
    @RequestMapping("/teacherExamCourseLists")
    @ResponseBody                                           //向浏览器返回json数据
    public Object getTeacherExamCourses(HttpSession httpSession){
        String s = (String) httpSession.getAttribute("loginTeacherId");
        Integer teacher_id = Integer.valueOf(s);
        return teacherExamCourseService.getTeacherExam(teacher_id);
    }
}
